package com.wang.jmonkey.interceptor.handler.result;


/**
 * @Description void类型异常返回结果
 * @Author HeJiawang
 * @Date 2021/5/21 11:08
 */
public class VoidExceptionResultHandler implements ExceptionResultHandler {

	private static final Object Void = null;

	@Override
	public Object result(Class<?> resultType, String errorMessage, ExceptionResultHandler handler) {
		if (void.class.isAssignableFrom(resultType)) {
			return Void;
		}

		return handler.result(resultType, errorMessage, handler);
	}

}
